import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ActingMatComponent } from './pages/acting-mat/acting-mat.component';
import { ActingMatDetailComponent } from './pages/acting-mat-detail/acting-mat-detail.component';
import { PaymentsComponent } from './pages/payments/payments.component';
import { PaymentsDetailComponent } from './pages/payments-detail/payments-detail.component';
import { MoneyComponent } from './pages/money/money.component';
import { MoneyDetailComponent } from './pages/money-detail/money-detail.component';
import { CostInfoComponent } from './pages/cost-info/cost-info.component';
import { SetUpComponent } from './pages/set-up/set-up.component';
import { ActingcostDetailComponent } from './pages/actingcost-detail/actingcost-detail.component';
const routes: Routes = [
    {
        path: 'actingmat',
        component: ActingMatComponent,
        data: { breadcrumbs: [{ title: '代垫费用' }] },
        children: [
            {
                path: 'detail/:id',
                component: ActingMatDetailComponent,
                data: { breadcrumbs: [{ title: '代垫费用', path: '/cost/actingmat' }, { title: '代垫详情' }] },
            },
            {
                path: 'detail',
                component: ActingMatDetailComponent,
                data: { breadcrumbs: [{ title: '代垫费用', path: '/cost/actingmat' }, { title: '添加代垫' }] },
            },
            {
                path: 'add/:id',
                component: ActingcostDetailComponent,
                data: { breadcrumbs: [{ title: '代垫费用', path: '/cost/actingmat' }, { title: '代垫详情' }] },
            },
            {
                path: 'add',
                component: ActingcostDetailComponent,
                data: { breadcrumbs: [{ title: '代垫费用', path: '/cost/actingmat' }, { title: '添加代垫' }] },
            },
        ]
    },

    {
        path: 'payments',
        component: PaymentsComponent,
        data: { breadcrumbs: [{ title: '管理费用列表' }] },
        children: [
            {
                path: 'detail/:id',
                component: PaymentsDetailComponent,
                data: { breadcrumbs: [{ title: '管理费用列表', path: '/cost/payments' }, { title: '费用详情' }] },
            },
            {
                path: 'detail',
                component: PaymentsDetailComponent,
                data: { breadcrumbs: [{ title: '管理费用列表', path: '/cost/payments' }, { title: '添加费用' }] },
            },
        ]
    },
    {
        path: 'money',
        component: MoneyComponent,
        data: { breadcrumbs: [{ title: '销售费用' }] },
        children: [
            {
                path: 'detail/:id',
                component: MoneyDetailComponent,
                data: { breadcrumbs: [{ title: '销售费用', path: '/cost/money' }, { title: '销售费用详情' }] },
            },
            {
                path: 'detail',
                component: MoneyDetailComponent,
                data: { breadcrumbs: [{ title: '销售费用', path: '/cost/money' }, { title: '添加销售费用' }] },
            },
        ]
    },
    {
        path: 'cost', component: CostInfoComponent, data: {
            breadcrumbs: [{ title: '费用类别' }]
        },

    },
    {
        path: 'setup', component: SetUpComponent, data: {
            breadcrumbs: [{ title: '费用管理' }]
        },

    }

];

export const declarationComponents = [
    ActingMatComponent,
    ActingMatDetailComponent,
    PaymentsComponent,
    PaymentsDetailComponent,
    MoneyDetailComponent,
    MoneyComponent,
    CostInfoComponent,
    SetUpComponent,
    ActingcostDetailComponent
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class CostRoutingModule { }
